<div class="coupon-review">
  <!--确认弹窗-->
  <p-confirmDialog acceptLabel="确认" rejectLabel="取消"></p-confirmDialog>
  <!--消息提示-->
  <p-messages  [closable]="true" [style]="{'position':'fixed','left': '10vw', 'top': '0','margin-top': '0','width': '100vw','z-index':'9999'}"></p-messages>
  <!--顶部按钮-->
  <div class="coupon-review-header">
    <div class=" ui-g-12">
      <div class="ui-g-1 coupon-review-header-btn coupon-review-header-btn-delete" (click)="couponReviewClick()">
        <!--<img class="coupon-review-header-img-delete" src="assets/images/ic_delete.png" alt="">-->
        <span>审 核</span>
      </div>
      <!--<div style="margin-top: 4.5vh;font-size: 0.875rem;margin-left: 1vw">-->
        <!--<label style="color: #fff;margin-left: 0.5vw" >小区：</label>-->
        <!--<p-dropdown [options]="SearchOption.village" scrollHeight="100px" placeholder="请选择小区..."></p-dropdown>-->
        <!--<label style="color: #fff;margin-left: 0.5vw">地块：</label>-->
        <!--<p-dropdown [options]="SearchOption.region" scrollHeight="100px" placeholder="请选择地块..."></p-dropdown>-->
        <!--<label style="color: #fff;margin-left: 0.5vw">楼栋：</label>-->
        <!--<p-dropdown [options]="SearchOption.building" scrollHeight="100px" placeholder="请选择楼栋..."></p-dropdown>-->
        <!--<label style="color: #fff;margin-left: 0.5vw">单元：</label>-->
        <!--<p-dropdown [options]="SearchOption.unit"  scrollHeight="100px" placeholder="请选择单元..."></p-dropdown>-->
        <!--<label style="color: #fff;margin-left: 0.5vw">房间：</label>-->
        <!--<p-dropdown [options]="SearchOption.room"  scrollHeight="100px" placeholder="请选择房间..."></p-dropdown>-->
      <!--</div>-->
    </div>
    <!--//搜索-->
    <div class="ui-inputgroup coupon-review-header-search">
      <input type="text" pInputText placeholder="请输入电话或房间号" style="width: 7vw" [(ngModel)]="couponReviewSeachData">
      <button id="disabled-btn" class="coupon-review-header-btn-search" type="button"  (click)="couponReviewSearchClick()"  label="搜索">搜索</button>
    </div>
  </div>
  <!--表格-->
  <div class="coupon-review-table">
    <p-scrollPanel [style]="{width:'100%',height: '95%'}" styleClass="custombar">
      <p-table [columns]="couponReviewTableTitle" [value]="couponReviewTableContent"  [(selection)]="couponReviewSelect" (onRowSelect)="couponReviewonRowSelect($event)">
        <ng-template pTemplate="header" let-columns>
          <tr >
            <th style="width: 3em"  [ngStyle]="this.couponReviewTableTitleStyle">
              <p-tableHeaderCheckbox></p-tableHeaderCheckbox>
            </th>
            <th *ngFor="let col of columns"  [ngStyle]="this.couponReviewTableTitleStyle">
              {{col.header}}
            </th>
          </tr>
        </ng-template>
        <ng-template pTemplate="body" let-rowData let-columns="columns" let-rowIndex="rowIndex">
          <tr [pSelectableRow]="rowData"  *ngIf="rowIndex%2!=1" [ngStyle]="{'background':'#33353C','color':'#DEDEDE','text-align': 'center','height':'2vw'}">
            <td>
              <p-tableCheckbox [value]="rowData"></p-tableCheckbox>
            </td>
            <td  *ngFor="let col of columns.slice(0,columns.length-1);" >
              {{rowData[col.field]}}
            </td>
            <td>
              <button class="coupon-review-table-Btn" (click)="couponReviewDetailClick(rowData)">详情</button>
            </td>
          </tr>
          <tr [pSelectableRow]="rowData"  *ngIf="rowIndex%2!=0" [ngStyle]="{'background':'#2E3037','color':'#DEDEDE','text-align': 'center','height':'2vw'}">
            <td>
              <p-tableCheckbox [value]="rowData"></p-tableCheckbox>
            </td>
            <td  *ngFor="let col of columns.slice(0,columns.length-1)" >
              {{rowData[col.field]}}
            </td>
            <td >
              <button class="coupon-review-table-Btn" (click)="couponReviewDetailClick(rowData)">详情</button>
            </td>
          </tr>
        </ng-template>
      </p-table>
    </p-scrollPanel>

  </div>
  <!--详情弹窗-->
  <p-dialog header="详细信息" [(visible)]="couponReviewDetailDialog" [width]="800">
    <!--Content-->
    <div class="ui-g ui-fluid" [ngStyle]="{'line-height':'3vh','text-align':'center'}">
      <div class="ui-g-6">
        <div class="ui-g-4">
          <label >组织名称：</label>
        </div>
        <div class="ui-g-8">
          <span>{{couponReviewDetail.organizationName}}</span>
        </div>
      </div>
      <div class="ui-g-6">
        <div class="ui-g-4">
          <label >小区名称：</label>
        </div>
        <div class="ui-g-8">
          <span>{{couponReviewDetail.villageName}}</span>
        </div>
      </div>
      <div class="ui-g-6">
        <div class="ui-g-4">
          <label >地块名称：</label>
        </div>
        <div class="ui-g-8">
          <span>{{couponReviewDetail.regionName}}</span>
        </div>
      </div>
      <div class="ui-g-6">
        <div class="ui-g-4">
          <label >楼宇名称：</label>
        </div>
        <div class="ui-g-8">
          <span >{{couponReviewDetail.buildingName}}</span>
        </div>
      </div>
      <div class="ui-g-6">
        <div class="ui-g-4">
          <label >单元名称：</label>
        </div>
        <div class="ui-g-8">
          <span>{{couponReviewDetail.unitName}}</span>
        </div>
      </div>
      <div class="ui-g-6">
        <div class="ui-g-4">
          <label >房间代码：</label>
        </div>
        <div class="ui-g-8">
          <span >{{couponReviewDetail.roomCode}}</span>
        </div>
      </div>
      <div class="ui-g-6">
        <div class="ui-g-4">
          <label >优惠券名称：</label>
        </div>
        <div class="ui-g-8">
          <span >{{couponReviewDetail.couponName}}</span>
        </div>
      </div>
      <div class="ui-g-6">
        <div class="ui-g-4">
          <label >优惠券类型：</label>
        </div>
        <div class="ui-g-8">
          <span >{{couponTypeName}}</span>
        </div>
      </div>
      <div class="ui-g-6">
        <div class="ui-g-4">
          <label >客户名称：</label>
        </div>
        <div class="ui-g-8">
          <span >{{couponReviewDetail.surname}}</span>
        </div>
      </div>
      <div class="ui-g-6">
        <div class="ui-g-4">
          <label >客户电话：</label>
        </div>
        <div class="ui-g-8">
          <span >{{couponReviewDetail.mobilePhone}}</span>
        </div>
      </div>
      <div class="ui-g-6">
        <div class="ui-g-4">
          <label>优惠金额：</label>
        </div>
        <div class="ui-g-8">
          <span >￥{{couponReviewDetail.money}}</span>
        </div>
      </div>
      <div class="ui-g-6">
        <div class="ui-g-4">
          <label >有效时间：</label>
        </div>
        <div class="ui-g-8">
          <span >{{couponEffectiveTime}}</span>
        </div>
      </div>
      <div class="ui-g-6" >
        <div class="ui-g-4">
          <label >过期状态：</label>
        </div>
        <div class="ui-g-8">
          <span>{{couponReviewDetail.pastDue}}</span>
        </div>
      </div>
      <div class="ui-g-6" >
        <div class="ui-g-4">
          <label >剩余金额：</label>
        </div>
        <div class="ui-g-8">
          <span>￥{{couponReviewDetail.usageState}}</span>
        </div>
      </div>
      <div class="ui-g-6">
        <div class="ui-g-4">
          <label >抵扣物业费金额：</label>
        </div>
        <div class="ui-g-8">
          <span >￥{{couponReviewDetail.balanceAmount}}</span>
        </div>
      </div>
      <div class="ui-g-6">
        <div class="ui-g-4">
          <label >开始时间：</label>
        </div>
        <div class="ui-g-8">
          <span >{{couponReviewDetail.startTime}}</span>
        </div>
      </div>
      <div class="ui-g-6">
        <div class="ui-g-4">
          <label >过期时间：</label>
        </div>
        <div class="ui-g-8">
          <span >{{couponReviewDetail.endTime}}</span>
        </div>
      </div>
    </div>
    <p-footer>
      <div class="ui-dialog-buttonpane ui-helper-clearfix">
        <!--<button class="coupon-review-dialog-Btn coupon-review-dialog-Btn-sure" (click)="couponReviewModifySureClick()">确认</button>-->
        <button class="coupon-review-dialog-Btn coupon-review-dialog-Btn-false"  (click)="couponReviewDetailDialog=false">取消</button>
      </div>
    </p-footer>
  </p-dialog>
  <p-dialog header="审核" [(visible)]="couponReviewDialog" [width]="500">
    <!--Content-->
    <div class="ui-g ui-fluid">
      <div class="ui-g-12">
        <div class="ui-g-4">
          <label >审核状态：</label>
        </div>
        <div class="ui-g-8">
          <p-radioButton type="radio" label="通过"  value="通过" name="group"  [(ngModel)]="reviewStatus"></p-radioButton>
          <p-radioButton type="radio" label="不通过"  value="不通过" name="group" [ngStyle]="{'margin-left':'3vw'}" [(ngModel)]="reviewStatus"></p-radioButton>
        </div>
      </div>
      <!--<div class="ui-g-12">-->
      <!--<button class="refund-review-dialog-Btn refund-review-dialog-Btn-sure" (click)="refundReviewSureClick()">通过</button>-->
      <!--<button class="refund-review-dialog-Btn refund-review-dialog-Btn-sure" (click)="refundReviewSureClick()">不通过</button>-->


      <!--</div>-->
      <!--<button class="refund-review-dialog-Btn refund-review-dialog-Btn-sure" (click)="refundReviewSureClick()">通过</button>-->
      <!--<button class="refund-review-dialog-Btn refund-review-dialog-Btn-sure" (click)="refundReviewSureClick()">不通过</button>-->
      <!--<button class="refund-review-dialog-Btn refund-review-dialog-Btn-false"  (click)="refundReviewDialog=false">取消</button>-->
    </div>
    <p-footer>
      <div class="ui-dialog-buttonpane ui-helper-clearfix">
        <!--<button class="refund-review-dialog-Btn refund-review-dialog-Btn-sure" (click)="refundReviewSureClick()">通过</button>-->
        <button class="coupon-review-dialog-Btn coupon-review-dialog-Btn-sure" (click)="refundReviewSureClick()">确定</button>
        <button class="coupon-review-dialog-Btn coupon-review-dialog-Btn-false"  (click)="couponReviewDialog=false">取消</button>
      </div>
    </p-footer>
  </p-dialog>
  <rbi-paging [option]="option" (pageClick)="nowpageEventHandle($event)"></rbi-paging>
  <rbi-loading [hidden]="loadingHide" style="position: absolute;left: 45vw;top:40vh;z-index: 99999"></rbi-loading>
</div>
